<div id="uni_mainContent">
    <h3 class="title"><span>Khách hàng mới</span></h3>
    <div class="popup_content">
        <form id="frmRegister" method="post" action="/auth/register" autocomplete="off">
        <?php 
			foreach(Yii::app()->user->getFlashes() as $key => $message){
				echo '<div class="each_row '.$key.'"><p>'.$message."</p></div>\n";
			}
		?>
        <div class="each_row">
            <label class="lbl_txt">
                <span class="col-md-4 col-sm-4 col-xs-4">Email:</span>
                <span class="col-md-8 col-sm-8 col-xs-8">
                    <input type="email" name="email" required />
                </span>
            </label>
        </div>
        <div class="each_row">
            <label class="lbl_txt">
                <span class="col-md-4 col-sm-4 col-xs-4">Mật khẩu:</span>
                <span class="col-md-8 col-sm-8 col-xs-8">
                    <input type="password" name="password" id="password" required />
                </span>
            </label>
        </div>  
        <div class="each_row">
            <label class="lbl_txt">
                <span class="col-md-4 col-sm-4 col-xs-4">Nhập lại mật khẩu:</span>
                <span class="col-md-8 col-sm-8 col-xs-8">
                    <input type="password" name="re_password" id="re_password" />
                </span>
            </label>
        </div>
        <?php if(CCaptcha::checkRequirements()): ?>
        <div class="each_row">
            <label class="lbl_txt">
                <span class="col-md-4 col-sm-4 col-xs-4">Mã xác thực:</span>
                <span class="col-md-8 col-sm-8 col-xs-8">
                    <div class="inpCapt">
                        <input type="text" id="verifyCode" name="verifyCode" required class="width_120 required" autocomplete="off">
                        <label class="error">This field is required.</label>
                    </div>
                    <div class="boxCaptcha">
                        <?php	$this->widget('CCaptcha',array( 'captchaAction'=>'auth/captcha', 
																'buttonLabel' => "Reload",
																'showRefreshButton' => true,
																'clickableImage' => true)); 
						?>
                    </div>
                </span>
            </label>
        </div> 
        <?php endif; ?>
        <div class="each_row">        	
        	<input class="btn_blueWhite" type="submit" value="Register" />
        </div>
        </form>
    </div>
</div>
<script>
$(document).ready(function(){
	$('#frmRegister').validate({
		rules: {
			password: {
				noSpace: true,
				minlength: 5
			},
			re_password: {
				equalTo: "#password"
			}
		}
	});
});
</script>